package org.example.common.listener;

import lombok.extern.slf4j.Slf4j;;
import org.example.common.service.ChangeStatusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @Author 李荣
 * @Date 2025/1/6
 * @Description
 */

@Slf4j
@Component
public class ChangeStatusListener {

    @Autowired
    private ChangeStatusService changeStatusService;

//    @KafkaListener(topics = "receive-switch-status")
//    public void execute(ConsumerRecord<?,?> consumerRecord , Acknowledgment ack)
//    {
//        String topic = consumerRecord.topic();
//        Object value = consumerRecord.value();
//        log.info("topic:{}",topic);
//        log.info("value:{}",value);
//
//        changeStatusService.execute(value);
//        ack.acknowledge();
//    }
}
